<!--{include(file='head.html')}-->
<script src="template/jslib/upload/ajaxupload.js" type="text/javascript"></script>
<div id="wrap">
	<!--{include('left.html')}-->
	
	<div id="maincont">
		<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
		<form action="<!--{url('admin','brand','brandsave')}-->" method="post" name="submitform" id="submitform">
		<div id="main_c">
		<!--{if $opertype == "edit"}-->
			<ul class="bk">
				<li>
					<label><em>*</em>品牌名称：</label>
					<p>
						<input class="input_tx" value="<!--{$brand.brandname}-->" name="brandname" id="brandname" type="text" />
					</p>
				</li>
				<li>
					<label>品牌网址：</label>
					<p>
						<input class="input_tx" value="<!--{def($brand.brandurl,'http://')}-->" name="brandurl" type="text" />
					</p>
				</li>
			</ul>
			
			<ul class="bk">
				<li>
					<label>品牌Logo：</label>
					<p>
						<div id="buttonholder"></div>
						<input type="hidden" value="<!--{$brand.brandlogo}-->" name="pic" id="pic"/>
						<span id="uploadpic">
							<!--{if $brand.brandlogo}-->
								<img src="<!--{$brand.brandlogo}-->" />
							<!--{/if}-->
						</span>
					</p>
				</li>
			</ul>
		<!--{elseif $opertype=="add"}-->
			<ul class="bk">
				<li>
					<label><em>*</em>品牌名称：</label>
					<p>
						<input class="input_tx" value="" name="brandname" id="brandname" type="text" />
					</p>
				</li>
				<li>
					<label>品牌网址：</label>
					<p>
						<input class="input_tx" value="http://" name="brandurl" type="text" />
					</p>
				</li>
			</ul>

			<ul class="bk">
				<li>
					<label>品牌Logo：</label>
					<div id="buttonholder"></div>
					<input type="hidden" value="" name="pic" id="pic"/>
					<span id="uploadpic"></span>
				</li>
			</ul>
		<!--{/if}-->
			<div class="bt_bk2">
					<input type="hidden" value="<!--{$opertype}-->" name="opertype" />
					<input type="hidden" value="<!--{def($brandid)}-->" name="brandid"/>
					<a href="javascript:void(0);" class="btn" onclick="jssubmit('brand');return false;"><span>保存</span></a>
			</div>
		</div>
		</form>
		<b class="b4b"></b><b class="b3b"></b><b class="b2b"></b><b class="b1b"></b>
	</div>
</div>
<!--{include(file='foot.html')}-->
<script type="text/javascript">
$(function(){
	var uploader = new qq.FileUploader({action:"<!--{url('admin','uploadfile','pic')}-->"});
});
</script>